package com.easybeanfit.UUService.config;

import com.easybeanfit.UUService.commutill.UUStrUtil;
import com.google.zxing.common.StringUtils;

/**
 * Created by Andy on 2016/6/16.
 * 申请联盟时状态
 */

public enum EnumShopStatus {
    REAPPLY_CANCEL("-2","重新申请联盟"),
    REAPPLY_REFUSE("-1","重新申请联盟"),
    APPLY("0","申请联盟"),
    UNION_CANCEL("1","取消联盟"),
    APPLY_CANCEL("2","取消申请联盟"),
    AGREE_APPLY("3","同意联盟/不同意联盟");

    EnumShopStatus( String status, String des) {
        this.status = status;
        this.des = des;
    }

    private String status;

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    private String des;

    public static String getDescByCode(String status) {
        if (!UUStrUtil.isEmpty(status)) {
            for (EnumShopStatus e : EnumShopStatus.values()) {
                if (e.status == status) {
                    return e.des;
                }
            }
        }
        return "";
    }
}
